import {QueryModel,RespModel} from "@/api/app/typescript/adModel"
import request from '@/utils/request';
import { AxiosPromise } from 'axios';

export function adApi(query : any){
    return request({
        url: '/admin/brush/swiper/list',
        method: 'get',
        params: query
    });
}
// 查询详细
export function getAd(id: any):AxiosPromise<RespModel>  {
    return request({
        url: '/admin/brush/swiper/' + id,
        method: 'get'
    });
}

// 新增
export function addAd(data: any) {
    return request({
        url: '/admin/brush/swiper',
        method: 'post',
        data: data,
    });
}

// 修改
export function updateAd(data: any) {
    return request({
        url: '/admin/brush/swiper',
        method: 'put',
        data: data
    });
}
//删除
export function deleteAd(ids: any) {
    return request({
        url: '/admin/brush/swiper/' + ids,
        method: 'delete',
    });
}
